<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="/project/bugweb/Public/Js/jquery-1.8.2.min.js"></script>
<script src="/project/bugweb/Public/Js/jquery-ui.min.js"></script>
<title>无标题文档</title>
<style type="text/css">
body{margin:0; padding:0; min-width:1200px; font-family:'微软雅黑';} div{margin:0; padding:0;} input{font-size:12px; font-family:'微软雅黑'} html{overflow-x:hidden;}
.logo1{background-color:rgba(0,0,0,0.1); height:45px; width:240px; padding:5px; text-align:center;}
.logo1 img{height:90%;}
.header{width:100%; height:55px; background-color:#09C; color:#FFF; position:fixed; z-index:10;}
.header ul{list-style:none; margin:0; padding:0; width:100%;}
.header li{width:45%; float:left; background-color:#09C; margin-right:10px; text-align:center;}

.header .usermd{list-style:none; margin:0; text-align:right;}
.header .usermd li{float:right; width:auto; padding:17.5px 35px; margin:0; font-size:14px; border-right:#06C 1px solid; cursor:pointer;}
.header .usermd li:last-child{border-left:#06C 1px solid}
.header .usermd li:hover{background-color:rgba(0,0,0,0.1);}

.header .userops{position:relative;}
.header .userops ul{position:absolute; top:55px; left:0; height:0; overflow:hidden; z-index:2; margin:0; background-color:#0CF;}
.header .userops li{float:none;padding:11.5px 20px; height:auto; width:auto; border:0;background-color:#FFF; color:#369; border:#CCC 1px solid; border-top:0;}
.header .userops li:last-child{border-left:#CCC 1px solid;}
.header .userops li:first-child{border:#CCC 1px solid; border-top:0;}
.header .userops li:hover{background-color:#09C; color:#FFF;}

.header .userwarn{position:relative;}
.header .userwarn .warnnum{padding:3px 7px; background-color:#F96; display:inline; margin:0 0 0 7px; border-radius:5px; font-size:12px;}
.header .userwarn ul{position:absolute; top:55px; width:350px; right:0; height:0; overflow:hidden; z-index:2; margin:0; background-color:#FFF;}
.header .userwarn li{float:none;padding:10px 15px; height:auto; width:100%; border:0;background-color:#FFF; font-size:12px; text-align:left; color:#369; border-bottom:#CCC 1px solid;}
.header .userwarn li:last-child{border-left:#CCC 1px solid;}
.header .userwarn li:first-child{border-bottom:#CCC 1px solid; font-size:15px; font-weight:bold; color:#666; background-color:#CCC;}
.header .userwarn li:first-child:hover{background-color:#CCC; color:#666;}
.header .userwarn li:hover{background-color:#09C; color:#FFF;}
.img_dragdown{ transform:rotate(0deg); margin:0 0 3px 5px;}

.mainmenu{width:250px; background-color:#333; color:#FFF; overflow:hidden; float:left; position:fixed; top:55px; left:0; z-index:10;}
.mainmenu header{background-color:#555; cursor:pointer; padding:11px 20px; border-bottom:#000 1px solid; font-size:15px;}
.mainmenu header:focus{outline:none;}
.mainmenu header:hover{background-color:#666;}
.mainmenu a{color:#FFF; text-decoration:none;}
.mainmenu ul{list-style:none; margin:0; padding:0px;}
.mainmenu li{width:100%; padding:10px 40px; cursor:pointer; font-size:13px; background-color:#999; border-bottom:#000 1px solid;}
.mainmenu li:hover{background-color:#666;}

.mainmenu .mainmenu2 ul{list-style:none; margin:0; padding:0; overflow:hidden; height:auto;}
.maincont{position:relative; top:50px; left:250px; height:1000px;}

.img_dragright{ transform:rotate(270deg); margin:0 5px 3px 0;}

a{text-decoration:none;}
</style>

<style type="text/css">
.mdtitle{height:33px; padding:13px 0 0 10px; font-size:15px; font-weight:bold; border-bottom:#999 1px solid; cursor:default;}
.authops ul{list-style:none; margin:10px 0; padding:0; display:block;}
.authops li{float:left; font-size:13px; padding:7px 20px; border:#999 1px solid; margin:0 10px; border-radius:1px; cursor:pointer; background-color:#DDD;}
.authops li:hover{background-color:#EEE;}

.usergroup{ font-size:14px;}
.usergroup ul{list-style:none; margin-left:10px; padding:0;}
.usergroup li{padding:5px 10px; margin:5px 0;}

.groupset{width:500px; height:auto; border-collapse:collapse; border:#CCC 1px solid; margin:20px 30px;}
.groupset tr:first-child{border:#999 1px solid; background-color:#EEE}
.groupset td{padding:10px 20px; font-size:14px;}
.groupset th{padding:10px 20px; font-size:14px;}
.groupset th{text-align:left;}

</style>

</head>

<body>
<div class="header">
	<ul>
    	<li style="text-align:left;"><div class="logo1"><img src="/project/bugweb/Public/Image/logo1.png"></div></li>
        <li style="float:right" class="usermd">
        	<ul>
                <li class="userops" onClick="clickUserOps()"><?php echo ($_SESSION['bw_user']['nickname']); ?><img align="absmiddle" src="/project/bugweb/Public/Image/sanjiao.png" width="15px" class="img_dragdown">
                	<ul>
                        <a href="../Bug/getBuglist"><li>返回前台</li></a>
                        <a href="../User/toLogout"><li>退出登录</li></a>
                    </ul>
                </li>
                <li class="userwarn" onClick="clickUserWarn()" style="padding:15px 35px;"><img align="absmiddle" src="/project/bugweb/Public/Image/tixing.png" width="25px"><p class="warnnum">3</p>
                	<ul>
                    	<li>"站内消息通知</li>
                    	<li>你有一条新消息</li>
                        <li>您有一条新消息</li>
                        <li>你有一条新消息</li>
                    </ul>
                </li>
            </ul>
        </li>
    </ul>
</div>
<div style="clear:both"></div>
<div class="mainmenu" id="mainmenu">
	
</div>
    <!--
	<div>
    	<header><img align="absmiddle" src="/project/bugweb/Public/Image/sanjiao.png" width="15px" class="img_dragright">管理员后台</header>
        <ul>
        	<a href="../Admin/Index"><li>用户管理</li></a>
            <li>组权限管理</li>
            <li>添加组权限</li>
        </ul>
    </div>
    <div>
    	<header><img align="absmiddle" src="/project/bugweb/Public/Image/sanjiao.png" width="15px" class="img_dragright">Bug网站</header>
        <ul>
        	<li>主页浏览</li>
            <li>添加Bug</li>
            <li>搜索Bug</li>
        </ul>
    </div>
</div>
-->
<!--
<div class="mainmenu">
	<ul>
    	<li class="mainmenu2">管理员后台
        	<ul>
            	<a><li>用户权限管理</li></a>
                <a><li>组权限管理</li></a>
                <a><li>添加权限</li></a>
            </ul>
        </li>
        <li>Bug统计</li>
    </ul>
</div>
-->

<div class="maincont">
<div class="mdtitle">用户授权</div>
<!--
<div class="usergroup">
	<form action="changeGroup" method="post">
    	<input type="hidden" name="userid" value="<?php echo ($userid); ?>">
	<ul>
    	<?php if(is_array($userGroups)): foreach($userGroups as $key=>$group): if(($group["own"] == 1)): ?><li><input type="checkbox"  name="ug[]" value="<?php echo ($group["id"]); ?>" checked><?php echo ($group["title"]); ?></li>
            <?php else: ?><li><input type="checkbox" name="ug[]" value="<?php echo ($group["id"]); ?>"><?php echo ($group["title"]); ?></li><?php endif; endforeach; endif; ?>
    </ul>
    <input type="submit" value="确定" class="buttonA"><input type="button" onClick="backUrl()" value="返回" class="buttonA">
    </form>
</div>
-->
<table class="groupset">
	<form action="changeGroup" method="post"><input type="hidden" name="userid" value="<?php echo ($userid); ?>">
    <?php if(is_array($userGroups)): foreach($userGroups as $key=>$group): if(($group["own"] == 1)): ?><tr><td><input  type="checkbox"  name="ug[]" value="<?php echo ($group["id"]); ?>" class="checkbox" checked><?php echo ($group["title"]); ?></td></tr>
            <?php else: ?><tr><td><input type="checkbox" name="ug[]" class="checkbox" value="<?php echo ($group["id"]); ?>"><?php echo ($group["title"]); ?></td></tr><?php endif; endforeach; endif; ?>
    <tr><td><input type="submit" value="确定" class="buttonA"><input type="button" value="返回" onClick="backUrl()" class="buttonA"></td></tr>
    </form>
</table>
</div>
</body>

<script language="javascript">
function backUrl(){
	window.open("../Admin/index","_self");
}
</script>

<script language="javascript">
var screenWidth, screenHeight, userOpsLiCount, userWarnLiCount, 
	userOpsStatus, userWarnStatus;
toRun();
//初始化数据
function toRun(){
	screenWidth	= $(window).width();
	screenHeight	= $(window).height();
	$("body").css("min-height",screenHeight+'px');
	$(".mainmenu").css("height",screenHeight-$(".header").height()+'px');
	$(".maincont").css("width", $(".header").width()-$(".mainmenu").width()+'px');
	$(".mainmenu .img_dragright").eq(0).css("-webkit-transform","rotate(0deg)");
	
	//手风琴菜单
	$(".mainmenu").accordion({header:"header",active:0});
}
//特效设计
function clickUserOps(){
	userOpsLiCount	= $(".userops ul").children("a").length;
	
	if($(".userops ul").css("height") == "0px"){
		userOpsStatus	= 1;
		if(userWarnStatus == 1 ) clickUserWarn();
		$(".userops").css("background-color",$(".userops:hover").css("background-color"));
		$(".userops ul").animate({height:userOpsLiCount*43},100);
		$(".userops .img_dragdown").css("-webkit-transform","rotate(180deg)");
	}else{
		userOpsStatus	= 0;
		$(".userops").css("background-color","");
		$(".userops ul").animate({height:0},100);
		$(".userops .img_dragdown").css("-webkit-transform","rotate(0deg)");
	}
}

function clickUserWarn(){
	userWarnLiCount	= $(".userwarn ul").children("li").length;
	
	if($(".userwarn ul").css("height") == "0px"){
		userWarnStatus	= 1;
		if(userOpsStatus == 1) clickUserOps();
		$(".userwarn").css("background-color",$(".userwarn:hover").css("background-color"));
		$(".userwarn ul").animate({height:userWarnLiCount*37},100).css("border","#CCC 1px solid");
		$(".userwarn .img_dragdown").css("-webkit-transform","rotate(180deg)");
	}else{
		userWarnStatus	= 0;
		$(".userwarn").css("background-color","");
		$(".userwarn ul").animate({height:0},100).css("border","#CCC 0px solid");
		$(".userwarn .img_dragdown").css("-webkit-transform","rotate(0deg)");
	}
}

$(".mainmenu header").click(function(){
	$(".mainmenu header .img_dragright").css("-webkit-transform","rotate(270deg)");
	$(this).children(".img_dragright").css("-webkit-transform","rotate(0deg)");
});

</script>
</html>